-
Notifications
You must be signed in to change notification settings - Fork 31
feat: Make serde serialization and deserialization optional via serde feature
#52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
default-features = false
26c6b0b to
c3deca7
Compare
TeXitoi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
Please update version to 0.19.0 as this is a breaking change
Well, the current implementation with the |
|
That’s just technical: is someone has default_features=false and use serde, it will break. I’m not affraid on upgrading the minor version on this crate, that’s already 18! |
|
Ha, I have your point, ok to disable by default. |
c3deca7 to
9b51e31
Compare
…e` feature
Disables serde serialization and deserialization for OSM objects by default.
This serialization and deserialization (`#[derive(Serialize, Deserialize)]`)
can be enabled via `serde` feature by either:
- `cargo add osmpbfreader -F serde`
- `osmpbfreader = { version = "0.19", features = ["serde"]}` in `Cargo.toml`
9b51e31 to
0a5de06
Compare
default-features = falseserde feature
TeXitoi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it could be great to test with and without the feature in the CI, at least to be sure that it compiles.
|
v0.19.0 published, thanks! |
This PR disables serde serialization and deserialization for OSM objects by default, reducing compiled binary size from 1.3MB to 1.1 MB and improving compilation times.
This serialization and deserialization (
#[derive(Serialize, Deserialize)]) can be enabled viaserdefeature by either:cargo add osmpbfreader -F serdeosmpbfreader = { version = "0.19", features = ["serde"]}inCargo.toml